package com.example.pjy.service.impl;

import com.example.pjy.mapper.AcademicMapper;
import com.example.pjy.pojo.Academic;
import com.example.pjy.pojo.Student;
import com.example.pjy.service.AcademicService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class AcademicServiceImpl implements AcademicService {
    @Resource
    private AcademicMapper academicMapper;









    @Override
    public void add(Academic academic){
        academicMapper.add(academic);
    }




    @Override
    public List<Academic> list(){
        return academicMapper.list();//只能查询当前用户的所有分类 告诉mapper层当前用户是谁
    }





    @Override
    public Academic findById(Integer student_id){
        Academic ac = academicMapper.findById(student_id);
        return ac;
    }




    @Override
    public void updateac(Academic academic){
        academicMapper.updateac(academic);
    }




    @Override
    public void delete(int StudentId){
        academicMapper.delete(StudentId);
    }




    @Override
    public boolean isExist(int StudentId){
        return academicMapper.isExist(StudentId);
    }
}
